import React, {Component} from 'react'
import './listItem.less'

export default class listItem extends React.Component {
  constructor (props) {
    super(props)
  }

  componentWillMount() {
    console.log(this.props.isFirstPage)
  }
  
  render () {
    const res = this.props
    return (
      <div className="sec1-list-a">
        <div className="list-info">
          <span className="list-index m_hide">
            {res.pageCurrent === 1 ? 
              '0'+(res.index+1) : 1+res.index+5*(res.pageCurrent-1)}
          </span>
          <p className="title">{res.title}</p>
          <p className="text m_hide">{res.text}</p>
          <p className="time">{res.time}</p>
          <p className="look-others m_hide">
            <span>查看更多</span>&gt;
          </p>
        </div>
        <div className="list-img">
          <img src={"http://shanzhouweb.yewu99.com:1103"+res.img} />
        </div>
      </div>
    )
  }
} 